package com.zkflzl.mianshi.constant;


/**
 * @Author：zhangke
 * @name：RedisConstant
 */
public class RedisKey {
    public static final String PREFIX = RedisCommonKey.FRONT_PREFIX;

    /**
     * 用户获取随机验证码，验证码存入Redis中对应的key 的前缀
     */
    public static final String USER_REDIS_CODE_PREFIX = PREFIX + "user:code:ip_%s";

    /**
     * 用户token放入Redis中key 的前缀
     */
    public static final String USER_REDIS_TOKEN_PREFIX =
            PREFIX + RedisCommonKey.USER_REDIS_TOKEN_PREFIX;

    /**
     * 用户访问量
     */
    public static final String USER_VISIT = PREFIX + "user:visit";

    public static final int REDIS_TOKEN_EXPIRE_TIME = 1;

    /**
     * 导出文件key
     */
    public static final String EXPORT_FILE = "%s:company_%d";
    public static final int EXPORT_FILE_TIME = 1800;

    /**
     * 组装Redis的key
     *
     * @param format
     * @param args
     * @return
     */
    public static String getKey(String format, Object... args) {
        return String.format(format, args);
    }
}
